﻿using System;
using System.Drawing;
using System.Windows.Forms;

namespace ruscehproj2
{
    public partial class bv010 : Form
    {
        bool enabled = false;
        bool isActive = false;
       // Voltmeter volt1 = new Voltmeter(225, 200, 45, 135);
        //int angle = 0;
        //int cnt = 0;
        public bv010()
        {
            InitializeComponent();
        }
       
        public void enable(bool inpt)
        {
            enabled = inpt;
        }

        public bool getState()
        {
            return isActive;
        }

        private void on_Click(object sender, EventArgs e)
        {
            if (enabled)
            {
                kit1light.BackgroundImage = Image.FromFile("grLight.png");
                kit1light.BackgroundImageLayout = ImageLayout.Stretch;
                //kit2light.BackgroundImage = Image.FromFile("grLight.png");
                //kit2light.BackgroundImageLayout = ImageLayout.Stretch;
                isActive = true;
            }
        }

        private void bv010_Load(object sender, EventArgs e)
        {
            if (!enabled)
            {
                kit1light.BackgroundImage = Resources.null256;
                kit1light.BackgroundImageLayout = ImageLayout.Stretch;
                isActive = false;
            }
        }

      

        private void bv010_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Escape)
            {
                this.Hide();
            }
        }


    }
}
